#!/usr/bin/python


def main():
    """ sum the integers up to 1000 divisible by 3 or 5 """
    nums = set()
    for i in xrange(1000):
        if i % 3 == 0:
            nums.add(i)
        if i % 5 == 0:
            nums.add(i)
    total = sum(nums)
    print total


if __name__ == '__main__':
  main()
